import { PRIORITY_VIEW } from "../../../Core/CoreDefine";
import { GCtrl } from "../../../Core/GCtrl";
import GViewBase from "../../../Core/GView/GViewBase";
import { CMsg, RPointMask, SPECIALWINDOW, VIPBOXTYPE, VIPRECEIVE } from "../../Common/Define";
import { VIEW_ID } from "../../Common/UI";
import { Res } from "../../Common/UIResources";
import GameMgr from "../../Logic/GameMgr";
import HangPage from "../Common/HangPage";
import TopUiItem from "../Common/TopUiItem";
import VipPage from "./VipPage";


const { ccclass, property, menu, executeInEditMode } = cc._decorator;
@ccclass @menu('View/Home/ShopView')

export default class ShopView extends GViewBase {

    @property({type: cc.Node, tooltip: "雅间模块"})  tog1Node: cc.Node = null;

    @property({type: cc.Node, tooltip: "书坊模块"})  tog2Node: cc.Node = null;

    selectTog:number = 1; //默认选择充值

    onGLoad() {
        this.addHang(1, "商店");
    }

    onClickHanlder(event:Event, str:string){
        if (str == "tog1"){
            this.selectTog = 1;
            this.tog1Node.active = true;
            this.tog2Node.active = false;
        }
        else if (str == "tog2"){
            this.selectTog = 2;
            this.tog1Node.active = false;
            this.tog2Node.active = true;
        }
    }
}